<template>
	<view class="">
		<view class="top flex">
			<image @tap="back" class="back" src="../static/imgs/ic_right_gray.png" mode=""></image>
			<view class="search">
				<input type="text" value="" placeholder="搜索 楼盘名/房产名/经纪人" />
			    <image src="../static/imgs/ic_search.png" mode=""></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		
		// props: ["key"],
		data() {
			return {
	
			}
		},
		onLoad(option) {
			// console.log(this.key)
		},
		methods:{
			back(){
				let pages = getCurrentPages(); // 当前页面
				 let beforePage = pages[pages.length - 2]; // 前一个页面
				 // console.log("beforePage");
				 // console.log(beforePage);
				 uni.navigateBack({
				     success: function() {
				         beforePage.onLoad(); // 执行前一个页面的onLoad方法
				     }
				 });
			},
		}
	}
</script>

<style scoped lang="scss">
	.top image{
		width: 21upx;
		height: 36upx;
		margin-right: 40upx;
		margin-top: 40upx;
		
		
	}
	.back{
		transform:rotate(180deg);
		-ms-transform:rotate(180deg); 	/* IE 9 */
		-moz-transform:rotate(180deg); 	/* Firefox */
		-webkit-transform:rotate(180deg); /* Safari 和 Chrome */
		-o-transform:rotate(180deg); 
		}
	
	
	.search{
		margin-top: 20upx;
		width:620upx;
		height:72upx;
		
		background:rgba(245,245,245,1);
		border-radius:12upx;
		position: relative;
		input{
			width: 80%;
			height:100%;
			font-size:24upx;
			padding: 0 30upx;
			
			color:rgba(153,153,153,1);
		}
		image{
			width:28upx;
			height:28upx;
			position: absolute;
			top: -19upx;
			right: -3%;
		}
	}
</style>
